<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box1{
            width: 0;
            height: 0;
            border-top: 10px solid pink;
            border-right: 10px solid skyblue;
            border-bottom: 10px solid purple;
            border-left: 10px solid red;
        }
        .box2{
            width: 0;
            height: 0;
            border: 50px solid transparent;
            /* border-top-color: pink; */
            border-right-color: skyblue;
            margin: 100px auto;
        }
        .jd{
            position: relative;
            width: 120px;
            height: 249px;
            background-color: antiquewhite;
        }
        .jd span{
            position: absolute;
            right: 15px;
            top: -20px;
            width: 0;
            height: 0;
            /* 为了考虑兼容性 */
            line-height: 0;
            font-size: 0;
            border: 10px solid transparent;
            border-bottom-color: antiquewhite;
        }
        .jd2 span{
            position: absolute;
            top: 0;
            right: 0;
            color: white;
            font-size: 12px;
            width: 0;
            height: 0;
            border-top: 45px solid green;
            border-left: 21px solid green;    /* 左侧边框宽度 */
            border-right: 21px solid green; 
            border-bottom: 9px solid transparent;
            line-height: 0;
        }
        .jd2 span::after {
            content: "减"; /* 添加文本内容 */
            position: relative;
            left: -19px; /*微调文本位置*/
            top: -23px;
            font-size: 38px;
        }
        .box3 {
            width: 0;
            height: 0;
            /* 把上边框宽度调大 */
            /* border-top: 100px solid transparent;
            border-right: 50px solid skyblue; */
            /* 左边和下边的边框宽度设置为0 */
            /* border-bottom: 0 solid blue;
            border-left: 0 solid green; */
            /* 1. 只保留右边的边框有颜色 */
            border-color: transparent red transparent transparent;
            /* 2. 样式都是solid */
            border-style: solid;
            /* 3. 上边框宽度要大， 右边框 宽度稍小， 其余的边框该为 0 */
            border-width: 100px 50px 0 0;
        }
    </style>
</head>
<body>
    <div class="box1"></div>
    <!-- 正常三角 -->
    <div class="box2"></div>
    <div class="jd">
        <span></span>
    </div>
    <!-- 扁的三角-->
    <div class="jd2">
        <span></span>
    </div>
    <!-- 直角 -->
    <div class="box3"></div>
</body>
</html>